# -*- coding: utf-8 -*-#

#-------------------------------------------------------------------------------
# Name:         ljy
# Description:  
# Author:       lenovo
# Date:         2018/11/24
#-------------------------------------------------------------------------------

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import bs4

url = 'http://www.xinhuanet.com/politics/2018-11/19/c_1123731703.htm'
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-gpu')
browser = webdriver.Chrome(chrome_options=chrome_options)
browser.get(url)
page = browser.page_source
browser.close()

s = ''
soup = bs4.BeautifulSoup(page, 'html5lib')
elems = soup.select('.part1 p')
for e in elems:
    s += str(e)
print(s)